<?php
/**
 * lertaLight - A smart ContentManagementSystem
 * --
 * 
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * --
 *
 * @package 	lertaLight
 * @author 		Frederic Darmstädter <fredericdarmstaedter@gmail.com>
 * @copyright 	2010 Frederic Darmstädter <fredericdarmstaedter@gmail.com>
 * @license 	http://opensource.org/licenses/mit-license.php MIT License
 * @version 	2.0 (2010-01-16)
 */


	// lertaLight functions
	require_once 'lertaLight/utils/page.class.php';
	require_once 'lertaLight/utils/menuGenerator.class.php';
	require_once 'lertaLight/utils/config.class.php';
	require_once 'lertaLight/utils/file.class.php';
	require_once 'lertaLight/utils/error.class.php';
	require_once 'lertaLight/utils/cache.class.php';
	
	// CSS Minify Support
	require_once 'lertaLight/libs/cssmin/cssmin.php';

	// YAML-Support
	require_once 'lertaLight/libs/symfony/yaml/sfYaml.php';
	require_once 'lertaLight/libs/symfony/yaml/sfYamlDumper.php';
	require_once 'lertaLight/libs/symfony/yaml/sfYamlInline.php';
	require_once 'lertaLight/libs/symfony/yaml/sfYamlParser.php';

	$page = new page();

	$pageRequest = @htmlentities($_GET['file']);
	
	if(empty($pageRequest))
		$pageRequest = 'index';
		
	$cache = new cache();
	
	print $cache->getPage($pageRequest);


